apt install firmware-linux firmware-linux-free firmware-misc-nonfree firmware-realtek firmware-amd-graphics intel-media-va-driver mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all vdpau-driver-all libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libva-drm2 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx
apt install maliit-keyboard qtvirtualkeyboard-plugin dkms linux-headers-amd64
apt install hunspell xinput
gsettings set org.maliit.keyboard.maliit enabled-languages "['es', 'emoji']"
gsettings set org.maliit.keyboard.maliit theme BreezeDark
apt install qtvirtualkeyboard-plugin
rm /usr/share/sddm/scripts/Xsetup
touch /usr/share/sddm/scripts/Xsetup
echo "#!/bin/sh" >> /usr/share/sddm/scripts/Xsetup
echo "displayfix" >> /usr/share/sddm/scripts/Xsetup

touch /bin/displayfix
chmod +x /bin/displayfix

echo "#!/bin/sh" >> /bin/displayfix
echo "xrandr --output eDP --rotate right" >> /bin/displayfix
echo "xinput set-prop \"FTS3528:00 2808:1015\" --type=float \"Coordinate Transformation Matrix\" 0 1 0 -1 0 1 0 0 1" >> /bin/displayfix
echo "xinput map-to-output 11 eDP" >> /bin/displayfix

echo "[Wayland]" >> /home/user/.config/kwinrc
echo "InputMethod=/usr/share/applications/com.github.maliit.keyboard.desktop" >> /home/user/.config/kwinrc

cp -r spi-amd-6.4 /usr/src/

sudo dkms add spi-amd/6.4
sudo dkms build spi-amd/6.4
sudo dkms install spi-amd/6.4

cp -r cirrus-drivers/* /lib/firmware/

cp maliit-keyboard /usr/local/bin/
chmod +x /usr/local/bin/maliit-keyboard
